<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试</title>
    <script src="vue.js"></script>
    <script src="axios.min.js"></script>
    <style>
        .itemStyle {
            border: 1px dashed black;
            border-radius: 15px;
            padding: 10px;
            width: 200px;
            height: 350px;
            text-align: center;
            float: left;
            margin-right: 50px;
            margin-bottom: 50px;
            box-shadow: 10px 10px 5px dimgray;
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, green), color-stop(100%, yellow));
        }
        .itemFont{
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 32px;
        }
    </style>
</head>

<body>
    <!-- <div id="app">
        <button @click="getAllCourses">获取课程信息</button><br>
       <table border="1px">
           <tr>
               <td>分类编号</td>
               <td>分类</td>
           </tr>
           <tr v-for="woniu in woniuList">
               <td>{{woniu.wid}}</td>
               <td>{{woniu.wname}}</td>
           </tr>
       </table>
    </div> -->
    <template id="parent">
        <div>
            <woniuchild></woniuchild>
            <woniuchild></woniuchild>
            <woniuchild></woniuchild>
        </div>
    </template>

    <template id="child">
        <div class="itemStyle">
            <div>
                <img src="images/xiao.jpg" alt="">
            </div>

            <div>
                <div class="itemFont">
                    第四阶段：Web前端框架
                </div>
                <div class="itemFont">
                    知识要点：SpringBoot简介, 环境搭建,热部署,分布式,Vue组件
                </div>
                <div class="itemFont" style="text-align: right;color: firebrick;">线下专区</div>
                <div>
                    <img src="images/头.jpg" width="22px" height="22px">
                    <span>张老师</span>
                    <span>35</span>
                </div>
            </div>
        </div>
    </template>

    <div id="app">
        <woniuparent></woniuparent>
    </div>

</body>

</html>
<script>
    var vm = new Vue({
        el: "#app",
        components: {
            "woniuparent":{
                template:"#parent",
                components: {
                    "woniuchild":{
                        template:"#child"
                    }
                }
            }
        }
        // data: {
        //     url:"http://localhost:8080/wonius",
        //     woniuList:[]
        // },
        // methods: {
        //     getAllCourses(){
        //         axios({
        //             url:this.url,
        //             method:"GET",
        //         }).then(res=>{
        //         //    this.woniuList=res.data.data.woniuList;
        //         console.log(res);
        //         })
        //     }
        // },
        
    });
</script>